//
//  ModelDetailViewController.h
//  CheXunWang
//
//  Created by zhu lin on 12/25/11.
//  Copyright 2011 Zhulin. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ASIHTTPRequest.h"

@interface ModelDetailViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UIScrollViewDelegate, ASIHTTPRequestDelegate>{
	UIImageView				*modelImageView;
	UILabel					*imageCountLabel;
	UILabel					*priceLabel;
	UILabel					*priceFor4SLabel;
	UIButton				*favoriteButton;
	UITableView				*modelDetailTableView;
	
	NSDictionary			*modelInfoDic;
	NSMutableDictionary		*modelDetailDic;
	
	ASIHTTPRequest			*modelImageRequest;
	ASIHTTPRequest			*modelDetailRequest;
}

@property (nonatomic, retain) IBOutlet UIImageView		*modelImageView;
@property (nonatomic, retain) IBOutlet UILabel			*imageCountLabel;
@property (nonatomic, retain) IBOutlet UILabel			*priceLabel;
@property (nonatomic, retain) IBOutlet UILabel			*priceFor4SLabel;
@property (nonatomic, retain) IBOutlet UIButton			*favoriteButton;
@property (nonatomic, retain) IBOutlet UITableView		*modelDetailTableView;
@property (nonatomic, retain) NSDictionary				*modelInfoDic;

- (IBAction)handleFavorite:(id)sender;
- (IBAction)show4SLocation:(id)sender;
- (IBAction)showImageList:(id)sender;
- (IBAction)addForCompare:(id)sender;
- (IBAction)gotoCalculator:(id)sender;
@end

/*
"字段名"类型"说明"
"modelId"INTEGER"车型编号"
"maxSpeed"NUMBER"最高车速（km/h）"
"speededUp"NUMBER"官方0-100加速（s）"
"brakeTest"NUMBER"实测100-0制动（m）"
"fuelConsumption"NUMBER"实测油耗（L）"
"combinedConsumption"NUMBER"工信部综合油耗（L）"
"qualityAssurance"VARCHAR2(100)"整车质保"
"length"INTEGER"长度(mm)"
"width"INTEGER"宽度(mm)"
"height"INTEGER"高度(mm)"
"wheelbase"INTEGER"轴距(mm)"
"frontTrack"INTEGER"前轮距(mm)"
"rearTrack"INTEGER"后轮距(mm)"
"minDisforfloor"INTEGER"最小离地间隙(mm)"
"weight"INTEGER"整备质量(Kg)"
"structure"VARCHAR2(20)"车身结构"
"doors"INTEGER"车门数(个)"
"seats"INTEGER"座位数(个)"
"tankVolume"NUMBER"油箱容积(L)"
"trunkVolume"VARCHAR2(20)"行李箱容积(L)"
"engineModel"VARCHAR2(20)"发动机型号"
"cylinderVolume"INTEGER"汽缸容积(cc)"
"displacement"NUMBER"排量(L)"
"workType"VARCHAR2(20)"工作方式"
"cylinderForm"VARCHAR2(20)"汽缸排列形式"
"cylinderNum"INTEGER"汽缸数(个)"
"valvesNum"INTEGER"每缸气门数(个)"
"compressRatio"NUMBER"压缩比"
"valveStructure"VARCHAR2(10)"气门结构"
"bore"NUMBER"缸径"
"stroke"NUMBER"冲程"
"maxHorsepower"VARCHAR2(20)"最大马力(Ps)"
"maxPower"VARCHAR2(20)"最大功率(kW)"
"maxPowerSpeed"VARCHAR2(20)"最大功率转速(rpm)"
"maxTorque"VARCHAR2(20)"最大扭矩(N·m)"
"maxTorqueSpeed"VARCHAR2(20)"最大扭矩转速(rpm)"
"engineEchnology"VARCHAR2(100)"发动机特有技术"
"fuelType"VARCHAR2(10)"燃料形式"
"fuelLabel"VARCHAR2(10)"燃油标号"
"fuelWay"VARCHAR2(20)"供油方式"
"cylinderHeadMaterial"VARCHAR2(10)"缸盖材料"
"cylinderBodyMaterial"VARCHAR2(20)"缸体材料"
"epStandards"VARCHAR2(10)"环保标准"
"gearNum"VARCHAR2(50)"挡位个数"
"transmissionType"VARCHAR2(30)"变速箱类型"
"drive"VARCHAR2(20)"驱动方式"
"frontSuspension"VARCHAR2(100)"前悬挂类型"
"rearSuspension"VARCHAR2(100)"后悬挂类型"
"powerType"VARCHAR2(50)"助力类型"
"bodyStructure"VARCHAR2(20)"车体结构"
"frontBrake"VARCHAR2(50)"前制动器类型"
"RearBrake"VARCHAR2(50)"后制动器类型"
"parkingBrake"VARCHAR2(50)"驻车制动类型"
"frontTire"VARCHAR2(50)"前轮胎规格"
"rearTire"VARCHAR2(50)"后轮胎规格"
"spareTire"VARCHAR2(20)"备胎规格"
"seatAirbag"CHAR(1)"驾驶座安全气囊"
"copilotAirbag"CHAR(1)"副驾驶安全气囊"
"frontSideAirbag"CHAR(1)"前排侧气囊"
"rearSideAirbag"CHAR(1)"后排侧气囊"
"frontHeadAirbag"CHAR(1)"前排头部气囊(气帘)"
"rearHeadAirbag"CHAR(1)"后排头部气囊(气帘)"
"kneeAirbag"CHAR(1)"膝部气囊"
"tpMonitorDevice"CHAR(1)"胎压监测装置"
"zeroTpTravel"CHAR(1)"零胎压继续行驶"
"seatBeltTips"CHAR(1)"安全带未系提示"
"engineSecurity"CHAR(1)"发动机电子防盗"
"centralLock"CHAR(1)"车内中控锁"
"remoteKey"CHAR(1)"遥控钥匙"
"keylessStartSystem"CHAR(1)"无钥匙启动系统"
"absAntiLock"CHAR(1)"ABS防抱死"
"brakingForceDistribution"CHAR(1)"制动力分配(EBD/CBC等)"
"brakeAssist"CHAR(1)"刹车辅助(EBA/BAS/BA等)"
"tractionControl"CHAR(1)"牵引力控制(ASR/TCS/TRC等)"
"stabilityControl"CHAR(1)"车身稳定控制(ESP/DSC/VSC等)"
"autoParking"CHAR(1)"自动驻车/上坡辅助"
"hillDescent"CHAR(1)"陡坡缓降"
"adjustableSuspension"CHAR(1)"可调悬挂"
"airSuspension"CHAR(1)"空气悬挂"
"activeSteering"CHAR(1)"主动转向系统"
"electricSunroof"CHAR(1)"电动天窗"
"panoramicSunroof"CHAR(1)"全景天窗"
"sportsPackage"CHAR(1)"运动外观套件"
"alloyWheels"CHAR(1)"铝合金轮毂"
"electricDoor"CHAR(1)"电动吸合门"
"coriumWheel"CHAR(1)"真皮方向盘"
"wheelUd"CHAR(1)"方向盘上下调节"
"wheelFr"CHAR(1)"方向盘前后调节"
"wheelElectric"CHAR(1)"方向盘电动调节"
"multifunctionWheel"CHAR(1)"多功能方向盘"
"wheelShift"CHAR(1)"方向盘换挡"
"cruise"CHAR(1)"定速巡航"
"parkAssist"CHAR(1)"泊车辅助"
"reverseVideo"CHAR(1)"倒车视频影像"
"rripComputerDisplay"CHAR(1)"行车电脑显示屏"
"hudDigitalDisplay"CHAR(1)"HUD抬头数字显示"
"coriumSimulationSeat"CHAR(1)"真皮/仿皮座椅"
"sportSeat"CHAR(1)"运动座椅"
"seatHl"CHAR(1)"座椅高低调节"
"waistSupport"CHAR(1)"腰部支撑调节"
"shoulderSupport"CHAR(1)"肩部支撑调节"
"frontSeatElectric"CHAR(1)"前排座椅电动调节"
"secondBackAngle"CHAR(1)"第二排靠背角度调节"
"secondSeatMove"CHAR(1)"第二排座椅移动"
"rearSeatElectric"CHAR(1)"后排座椅电动调节"
"electricSeatMemory"CHAR(1)"电动座椅记忆"
"frontSeatHeating"CHAR(1)"前排座椅加热"
"rearSeatHeating"CHAR(1)"后排座椅加热"
"seatAiriness"CHAR(1)"座椅通风"
"seatMassage"CHAR(1)"座椅按摩"
"rearSeatOverall"CHAR(1)"后排座椅整体放倒"
"rearSeatRatio"CHAR(1)"后排座椅比例放倒"
"thirdSeat"CHAR(1)"第三排座椅"
"frontCenterArmrest"CHAR(1)"前座中央扶手"
"rearCenterArmrest"CHAR(1)"后座中央扶手"
"rearCupHolder"CHAR(1)"后排杯架"
"electricTrunk"CHAR(1)"电动后备箱"
"gpsNavigateSystem"CHAR(1)"GPS导航系统"
"locateInteractionService"CHAR(1)"定位互动服务"
"centerColorScreen"CHAR(1)"中控台彩色大屏"
"humanComputerSystem"CHAR(1)"人机交互系统"
"hardDrive"CHAR(1)"内置硬盘"
"bluetoothPhone"CHAR(1)"蓝牙/车载电话"
"carTv"CHAR(1)"车载电视"
"rearLcdScreen"CHAR(1)"后排液晶屏"
"externalAudioInterfaces"CHAR(1)"外接音源接口(AUX/USB/iPod等)"
"cdSupportMp3"CHAR(1)"CD支持MP3/WMA"
"singleCd"CHAR(1)"单碟CD"
"virtualMultiCd"CHAR(1)"虚拟多碟CD"
"multiCdSystem"CHAR(1)"多碟CD系统"
"singleDvd"CHAR(1)"单碟DVD"
"multiDvdSystem"CHAR(1)"多碟DVD系统"
"twoSpeakerSystem"CHAR(1)"2-3喇叭扬声器系统"
"fourSpeakerSystem"CHAR(1)"4-5喇叭扬声器系统"
"sixSpeakerSystem"CHAR(1)"6-7喇叭扬声器系统"
"eightSpeakerSystem"CHAR(1)"≥8喇叭扬声器系统"
"xenonLight"CHAR(1)"氙气大灯"
"daytimeRunningLight"CHAR(1)"日间行车灯"
"autoHeadlight"CHAR(1)"自动头灯"
"steeringHeadlight"CHAR(1)"转向头灯(辅助灯)"
"frontFogLight"CHAR(1)"前雾灯"
"lightHeight"CHAR(1)"大灯高度可调"
"lightCleanDevice"CHAR(1)"大灯清洗装置"
"atmosphereLight"CHAR(1)"车内氛围灯"
"frontPowerWindow"CHAR(1)"前电动车窗"
"rearPowerWindow"CHAR(1)"后电动车窗"
"windowAntiTrapHand"CHAR(1)"车窗防夹手功能"
"uvInsulatedGlass"CHAR(1)"防紫外线/隔热玻璃"
"rearviewElectric"CHAR(1)"后视镜电动调节"
"rearviewHeating"CHAR(1)"后视镜加热"
"rearviewAutoAntiGlare"CHAR(1)"后视镜自动防眩目"
"rearviewElectricFold"CHAR(1)"后视镜电动折叠"
"rearviewMemory"CHAR(1)"后视镜记忆"
"rearWindShadeCurtain"CHAR(1)"后风挡遮阳帘"
"rearShadeCurtain"CHAR(1)"后排侧遮阳帘"
"shadeMirror"CHAR(1)"遮阳板化妆镜"
"rearWiper"CHAR(1)"后雨刷"
"sensingWipers"CHAR(1)"感应雨刷"
"manualAir"CHAR(1)"手动空调"
"autoAir"CHAR(1)"自动空调"
"rearIndependentAir"CHAR(1)"后排独立空调"
"rearOutlet"CHAR(1)"后座出风口"
"temperatureZoneControl"CHAR(1)"温度分区控制"
"airControlPollenFilter"CHAR(1)"空气调节/花粉过滤"
"carRefrigerator"CHAR(1)"车载冰箱"
"autoParkingPlace"CHAR(1)"自动泊车入位"
"andLineAuxiliary"CHAR(1)"并线辅助"
"activeBrake"CHAR(1)"主动刹车/主动安全系统"
"overalActiveSystem"CHAR(1)"整体主动转向系统"
"nightSystem"CHAR(1)"夜视系统"
"controlLcdScreen"CHAR(1)"中控液晶屏分屏显示"
"adaptiveCruise"CHAR(1)"自适应巡航"
"panoramicCamera"CHAR(1)"全景摄像头"
 */
